import React from 'react';
import {Form, Row, Col, Select, DatePicker, Button} from 'antd';
import {formItemLayout} from '@/common/FormLayout';
import locale from 'antd/lib/date-picker/locale/zh_CN';

const FormItem = Form.Item;
const Option = Select.Option;

class Search extends React.Component {
  render () {
    const {getFieldDecorator} = this.props.form;

    return (
      <Form className="page-activity-search">
        <Row gutter={14}>
          <Col span={8}>
            <FormItem {...formItemLayout} label="车系">
              {getFieldDecorator ('car') (
                <Select placeholder="请选择车系">
                  <Option value="china">China</Option>
                  <Option value="use">U.S.A</Option>
                </Select>
              )}
            </FormItem>
          </Col>
          <Col span={8}>
            <FormItem {...formItemLayout} label="类型">
              {getFieldDecorator ('type') (
                <Select placeholder="请选择类型">
                  <Option value="china">China</Option>
                  <Option value="use">U.S.A</Option>
                </Select>
              )}
            </FormItem>
          </Col>
          <Col span={8}>
            <FormItem {...formItemLayout} label="推广状态">
              {getFieldDecorator ('status') (
                <Select placeholder="请选择推广状态">
                  <Option value="china">China</Option>
                  <Option value="use">U.S.A</Option>
                </Select>
              )}
            </FormItem>
          </Col>
          <Col span={8}>
            <FormItem {...formItemLayout} label="开始时间">
              {getFieldDecorator ('startTime') (
                <DatePicker
                  locale={locale}
                  showTime
                  format="YYYY-MM-DD HH:mm:ss"
                />
              )}
            </FormItem>
          </Col>
          <Col span={8}>
            <FormItem {...formItemLayout} label="结束时间">
              {getFieldDecorator ('endTime') (
                <DatePicker
                  locale={locale}
                  showTime
                  format="YYYY-MM-DD HH:mm:ss"
                />
              )}
            </FormItem>
          </Col>
          <Col span={8}>
            <FormItem>
              <Button type="primary" htmlType="submit" className="butn-search">
                搜索
              </Button>
            </FormItem>
          </Col>
        </Row>
        <FormItem />
      </Form>
    );
  }
}

export default Form.create () (Search);
